// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗  
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝  
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// -----------------------------------------------
//  
// This file is automatically generated 
// Please do not edit these files manually
// Run the following in the root of the repos:
//
// 		*NIX 		:	./build.sh codegen
// 		Windows 	:	build.bat codegen
//
// -----------------------------------------------
// ReSharper disable RedundantUsingDirective
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using System.Runtime.Serialization;
using Elastic.Transport;
using Elasticsearch.Net;
using Nest.Utf8Json;
using Elasticsearch.Net.Specification.NodesApi;

// ReSharper disable RedundantBaseConstructorCall
// ReSharper disable UnusedTypeParameter
// ReSharper disable PartialMethodWithSinglePart
// ReSharper disable RedundantNameQualifier
namespace Nest
{
	[InterfaceDataContract]
	public partial interface INodesHotThreadsRequest : IRequest<NodesHotThreadsRequestParameters>
	{
		[IgnoreDataMember]
		NodeIds NodeId
		{
			get;
		}
	}

	///<summary>Request for HotThreads <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html</para></summary>
	public partial class NodesHotThreadsRequest : PlainRequestBase<NodesHotThreadsRequestParameters>, INodesHotThreadsRequest
	{
		protected INodesHotThreadsRequest Self => this;
		internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesHotThreads;
		protected override HttpMethod HttpMethod => HttpMethod.GET;
		protected override bool SupportsBody => false;
		///<summary>/_nodes/hot_threads</summary>
		public NodesHotThreadsRequest(): base()
		{
		}

		///<summary>/_nodes/{node_id}/hot_threads</summary>
		///<param name = "nodeId">Optional, accepts null</param>
		public NodesHotThreadsRequest(NodeIds nodeId): base(r => r.Optional("node_id", nodeId))
		{
		}

		// values part of the url path
		[IgnoreDataMember]
		NodeIds INodesHotThreadsRequest.NodeId => Self.RouteValues.Get<NodeIds>("node_id");
		// Request parameters
		///<summary>Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)</summary>
		public bool? IgnoreIdleThreads
		{
			get => Q<bool? >("ignore_idle_threads");
			set => Q("ignore_idle_threads", value);
		}

		///<summary>The interval for the second sampling of threads</summary>
		public Time Interval
		{
			get => Q<Time>("interval");
			set => Q("interval", value);
		}

		///<summary>Number of samples of thread stacktrace (default: 10)</summary>
		public long? Snapshots
		{
			get => Q<long? >("snapshots");
			set => Q("snapshots", value);
		}

		///<summary>The type to sample (default: cpu)</summary>
		public ThreadType? ThreadType
		{
			get => Q<ThreadType? >("type");
			set => Q("type", value);
		}

		///<summary>Specify the number of threads to provide information for (default: 3)</summary>
		public long? Threads
		{
			get => Q<long? >("threads");
			set => Q("threads", value);
		}

		///<summary>Explicit operation timeout</summary>
		public Time Timeout
		{
			get => Q<Time>("timeout");
			set => Q("timeout", value);
		}
	}

	[InterfaceDataContract]
	public partial interface INodesInfoRequest : IRequest<NodesInfoRequestParameters>
	{
		[IgnoreDataMember]
		NodeIds NodeId
		{
			get;
		}

		[IgnoreDataMember]
		Metrics Metric
		{
			get;
		}
	}

	///<summary>Request for Info <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html</para></summary>
	public partial class NodesInfoRequest : PlainRequestBase<NodesInfoRequestParameters>, INodesInfoRequest
	{
		protected INodesInfoRequest Self => this;
		internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesInfo;
		protected override HttpMethod HttpMethod => HttpMethod.GET;
		protected override bool SupportsBody => false;
		///<summary>/_nodes</summary>
		public NodesInfoRequest(): base()
		{
		}

		///<summary>/_nodes/{node_id}</summary>
		///<param name = "nodeId">Optional, accepts null</param>
		public NodesInfoRequest(NodeIds nodeId): base(r => r.Optional("node_id", nodeId))
		{
		}

		///<summary>/_nodes/{metric}</summary>
		///<param name = "metric">Optional, accepts null</param>
		public NodesInfoRequest(Metrics metric): base(r => r.Optional("metric", metric))
		{
		}

		///<summary>/_nodes/{node_id}/{metric}</summary>
		///<param name = "nodeId">Optional, accepts null</param>
		///<param name = "metric">Optional, accepts null</param>
		public NodesInfoRequest(NodeIds nodeId, Metrics metric): base(r => r.Optional("node_id", nodeId).Optional("metric", metric))
		{
		}

		// values part of the url path
		[IgnoreDataMember]
		NodeIds INodesInfoRequest.NodeId => Self.RouteValues.Get<NodeIds>("node_id");
		[IgnoreDataMember]
		Metrics INodesInfoRequest.Metric => Self.RouteValues.Get<Metrics>("metric");
		// Request parameters
		///<summary>Return settings in flat format (default: false)</summary>
		public bool? FlatSettings
		{
			get => Q<bool? >("flat_settings");
			set => Q("flat_settings", value);
		}

		///<summary>Explicit operation timeout</summary>
		public Time Timeout
		{
			get => Q<Time>("timeout");
			set => Q("timeout", value);
		}
	}

	[InterfaceDataContract]
	public partial interface IReloadSecureSettingsRequest : IRequest<ReloadSecureSettingsRequestParameters>
	{
		[IgnoreDataMember]
		NodeIds NodeId
		{
			get;
		}
	}

	///<summary>Request for ReloadSecureSettings <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings</para></summary>
	public partial class ReloadSecureSettingsRequest : PlainRequestBase<ReloadSecureSettingsRequestParameters>, IReloadSecureSettingsRequest
	{
		protected IReloadSecureSettingsRequest Self => this;
		internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesReloadSecureSettings;
		protected override HttpMethod HttpMethod => HttpMethod.POST;
		protected override bool SupportsBody => true;
		///<summary>/_nodes/reload_secure_settings</summary>
		public ReloadSecureSettingsRequest(): base()
		{
		}

		///<summary>/_nodes/{node_id}/reload_secure_settings</summary>
		///<param name = "nodeId">Optional, accepts null</param>
		public ReloadSecureSettingsRequest(NodeIds nodeId): base(r => r.Optional("node_id", nodeId))
		{
		}

		// values part of the url path
		[IgnoreDataMember]
		NodeIds IReloadSecureSettingsRequest.NodeId => Self.RouteValues.Get<NodeIds>("node_id");
		// Request parameters
		///<summary>Explicit operation timeout</summary>
		public Time Timeout
		{
			get => Q<Time>("timeout");
			set => Q("timeout", value);
		}
	}

	[InterfaceDataContract]
	public partial interface INodesStatsRequest : IRequest<NodesStatsRequestParameters>
	{
		[IgnoreDataMember]
		NodeIds NodeId
		{
			get;
		}

		[IgnoreDataMember]
		Metrics Metric
		{
			get;
		}

		[IgnoreDataMember]
		IndexMetrics IndexMetric
		{
			get;
		}
	}

	///<summary>Request for Stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html</para></summary>
	public partial class NodesStatsRequest : PlainRequestBase<NodesStatsRequestParameters>, INodesStatsRequest
	{
		protected INodesStatsRequest Self => this;
		internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesStats;
		protected override HttpMethod HttpMethod => HttpMethod.GET;
		protected override bool SupportsBody => false;
		///<summary>/_nodes/stats</summary>
		public NodesStatsRequest(): base()
		{
		}

		///<summary>/_nodes/{node_id}/stats</summary>
		///<param name = "nodeId">Optional, accepts null</param>
		public NodesStatsRequest(NodeIds nodeId): base(r => r.Optional("node_id", nodeId))
		{
		}

		///<summary>/_nodes/stats/{metric}</summary>
		///<param name = "metric">Optional, accepts null</param>
		public NodesStatsRequest(Metrics metric): base(r => r.Optional("metric", metric))
		{
		}

		///<summary>/_nodes/{node_id}/stats/{metric}</summary>
		///<param name = "nodeId">Optional, accepts null</param>
		///<param name = "metric">Optional, accepts null</param>
		public NodesStatsRequest(NodeIds nodeId, Metrics metric): base(r => r.Optional("node_id", nodeId).Optional("metric", metric))
		{
		}

		///<summary>/_nodes/stats/{metric}/{index_metric}</summary>
		///<param name = "metric">Optional, accepts null</param>
		///<param name = "indexMetric">Optional, accepts null</param>
		public NodesStatsRequest(Metrics metric, IndexMetrics indexMetric): base(r => r.Optional("metric", metric).Optional("index_metric", indexMetric))
		{
		}

		///<summary>/_nodes/{node_id}/stats/{metric}/{index_metric}</summary>
		///<param name = "nodeId">Optional, accepts null</param>
		///<param name = "metric">Optional, accepts null</param>
		///<param name = "indexMetric">Optional, accepts null</param>
		public NodesStatsRequest(NodeIds nodeId, Metrics metric, IndexMetrics indexMetric): base(r => r.Optional("node_id", nodeId).Optional("metric", metric).Optional("index_metric", indexMetric))
		{
		}

		// values part of the url path
		[IgnoreDataMember]
		NodeIds INodesStatsRequest.NodeId => Self.RouteValues.Get<NodeIds>("node_id");
		[IgnoreDataMember]
		Metrics INodesStatsRequest.Metric => Self.RouteValues.Get<Metrics>("metric");
		[IgnoreDataMember]
		IndexMetrics INodesStatsRequest.IndexMetric => Self.RouteValues.Get<IndexMetrics>("index_metric");
		// Request parameters
		///<summary>A comma-separated list of fields for the `completion` index metric (supports wildcards)</summary>
		public Fields CompletionFields
		{
			get => Q<Fields>("completion_fields");
			set => Q("completion_fields", value);
		}

		///<summary>A comma-separated list of fields for the `fielddata` index metric (supports wildcards)</summary>
		public Fields FielddataFields
		{
			get => Q<Fields>("fielddata_fields");
			set => Q("fielddata_fields", value);
		}

		///<summary>A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)</summary>
		public Fields Fields
		{
			get => Q<Fields>("fields");
			set => Q("fields", value);
		}

		///<summary>A comma-separated list of search groups for `search` index metric</summary>
		public bool? Groups
		{
			get => Q<bool? >("groups");
			set => Q("groups", value);
		}

		///<summary>Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)</summary>
		public bool? IncludeSegmentFileSizes
		{
			get => Q<bool? >("include_segment_file_sizes");
			set => Q("include_segment_file_sizes", value);
		}

		///<summary>Return indices stats aggregated at index, node or shard level</summary>
		public Level? Level
		{
			get => Q<Level? >("level");
			set => Q("level", value);
		}

		///<summary>Explicit operation timeout</summary>
		public Time Timeout
		{
			get => Q<Time>("timeout");
			set => Q("timeout", value);
		}

		///<summary>A comma-separated list of document types for the `indexing` index metric</summary>
		public string[] Types
		{
			get => Q<string[]>("types");
			set => Q("types", value);
		}
	}

	[InterfaceDataContract]
	public partial interface INodesUsageRequest : IRequest<NodesUsageRequestParameters>
	{
		[IgnoreDataMember]
		NodeIds NodeId
		{
			get;
		}

		[IgnoreDataMember]
		Metrics Metric
		{
			get;
		}
	}

	///<summary>Request for Usage <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html</para></summary>
	public partial class NodesUsageRequest : PlainRequestBase<NodesUsageRequestParameters>, INodesUsageRequest
	{
		protected INodesUsageRequest Self => this;
		internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesUsage;
		protected override HttpMethod HttpMethod => HttpMethod.GET;
		protected override bool SupportsBody => false;
		///<summary>/_nodes/usage</summary>
		public NodesUsageRequest(): base()
		{
		}

		///<summary>/_nodes/{node_id}/usage</summary>
		///<param name = "nodeId">Optional, accepts null</param>
		public NodesUsageRequest(NodeIds nodeId): base(r => r.Optional("node_id", nodeId))
		{
		}

		///<summary>/_nodes/usage/{metric}</summary>
		///<param name = "metric">Optional, accepts null</param>
		public NodesUsageRequest(Metrics metric): base(r => r.Optional("metric", metric))
		{
		}

		///<summary>/_nodes/{node_id}/usage/{metric}</summary>
		///<param name = "nodeId">Optional, accepts null</param>
		///<param name = "metric">Optional, accepts null</param>
		public NodesUsageRequest(NodeIds nodeId, Metrics metric): base(r => r.Optional("node_id", nodeId).Optional("metric", metric))
		{
		}

		// values part of the url path
		[IgnoreDataMember]
		NodeIds INodesUsageRequest.NodeId => Self.RouteValues.Get<NodeIds>("node_id");
		[IgnoreDataMember]
		Metrics INodesUsageRequest.Metric => Self.RouteValues.Get<Metrics>("metric");
		// Request parameters
		///<summary>Explicit operation timeout</summary>
		public Time Timeout
		{
			get => Q<Time>("timeout");
			set => Q("timeout", value);
		}
	}
}